//
//  YunGridCell.swift
//  YunChenCalculator
//
//  Created by Li Dong on 2023/10/16.
//

import UIKit

class YunGridCell: UICollectionViewCell {

    @IBOutlet weak var numberLabel: UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        numberLabel.layer.cornerRadius = 8
        numberLabel.layer.masksToBounds = true
    }
    
    var model: YunGridModel! {
        didSet {
            numberLabel.text = model.number
            if model.isSelect {
                numberLabel.backgroundColor = UIColor.init(hex: 0xFF7A35)
            }else{
                numberLabel.backgroundColor = UIColor.init(hex: 0x5EE051)
            }
        }
    }

}
